#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow( QWidget* parent ) : QMainWindow( parent ), ui( new Ui::MainWindow ) {
    ui->setupUi( this );

    isChange = false;
}

MainWindow::~MainWindow() {
    delete ui;
}

void MainWindow::on_pushButton_clicked() {
    qDebug() << "on_pushButton_clicked";
    if ( !isChange ) {
        isChange = true;
        translator.load( ":res/myI18N_en_US.qm" );
        qApp->installTranslator( &translator );
        ui->retranslateUi( this );
    }
    else {
        qApp->removeTranslator( &translator );
        ui->retranslateUi( this );
        isChange = false;
    }
}
